// This is a part of the Microsoft Foundation Classes C++ library.
// Copyright (C) Microsoft Corporation
// All rights reserved.
//
// This source code is only intended as a supplement to the
// Microsoft Foundation Classes Reference and related
// electronic documentation provided with the library.
// See these sources for detailed information regarding the
// Microsoft Foundation Classes product.

#pragma once


#include "GeoLocation.h"
#include "3DModels.h"
//#include "citygml.h"
#include <list>
#include <vector>
//#include "FreeImage.h" 


class InstantiatedModel
{
public:
	CGeoLoc location;
	CModel	*pModel;

//	InstantiatedModel() {};
	InstantiatedModel(GeoSystems sys, double x, double y, double z, double or) : location(sys, x, y, z, or) {};
};



//////////////////////////////////////////////////////////////////////////////////////
// CUberViewerDoc
class CUberViewerDoc : public CDocument
{
protected: // create from serialization only
	CUberViewerDoc();
	DECLARE_DYNCREATE(CUberViewerDoc)

// Attributes
public:
	bool	m_changedModels;
	bool	m_changedTextures;
	bool	m_changedLocation;
  
	double  m_minlat, m_maxlat;
	double  m_minlon, m_maxlon;
	CGeoLoc m_loc;

	std::list<InstantiatedModel*>  m_instantiatedModels;
	CTexture				       *m_OSmap;
	bool						   m_ShowOSmap;

public:
// Operations
	void DeleteModel(CModel *model) ;
	void UpdateGeoLocation();
    BOOL SelectObject();

//	void SetSelectionViaInstance(SIfc3DObject *instance);
//	void SetSelection(SIfcDocument* doc, SIfc3DObject *instance);

// Overrides
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);

// Implementation
public:
	virtual ~CUberViewerDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnImport();
};
